package com.macaline.technology.webService.service.impl;

import com.macaline.technology.webService.service.WeatherService;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import java.nio.charset.StandardCharsets;

@WebService(name = "weather", targetNamespace = "weatherService")
public class WeatherServiceImpl implements WeatherService {


    @WebMethod(operationName = "getWeather")
    public @WebResult(name = "returnValue") byte[] getWeatherByCityname(@WebParam(name = "cityName") String cityName) {
        return (cityName + "天气晴朗").getBytes(StandardCharsets.UTF_8);
    }

    @WebMethod(operationName = "getWeather1")
    public @WebResult(name = "returnValue1") String getWeatherByCityname1(@WebParam(name = "cityName1") Integer cityName1) {
        return cityName1 + "天气阴";
    }
}
